/// .Net Framework 4主表安装位置
const NET_FRAMEWORK_CHECK_FILE: &str = r"C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe";

/// .Net Framework 注册表位置
const NET_FRAMEWORK_CLIENT_REG: &str = r"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client";
const NET_FRAMEWORK_FULL_REG: &str = r"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full";

/// .Net Framework 安装包加载
const NET_FRAMEWORK: &str = "NetFx40_Full_x86_x64.exe";
const NET_FRAMEWORK_INCLUDE: &str = "1850354144/13639499";

/// .Net Framework 获取信息
pub struct FrameworkInfo<'a> {
    pub name: &'a str,
    pub check_file: &'a str,
    pub client_reg: &'a str,
    pub full_reg: &'a str,
    pub includes: &'a str,
}

impl<'a> FrameworkInfo<'a> {
    pub fn new() -> Self {
        Self {
            name: NET_FRAMEWORK,
            check_file: NET_FRAMEWORK_CHECK_FILE,
            client_reg: NET_FRAMEWORK_CLIENT_REG,
            full_reg: NET_FRAMEWORK_FULL_REG,
            includes: NET_FRAMEWORK_INCLUDE
        }
    }
}